x86_32: Build fixes after page-sharing patches.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Dec 2009 16:09:19 +0000 (16:09 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Dec 2009 16:09:19 +0000 (16:09 +0000)
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/p2m.c

index 1625016a2047624bd20b37572541d7c0a3bfd620..c9eb95bdbc25fca22b44d7491b9428862d04beb7 100644 (file)
@@ -214,7 +214,7 @@ static void mem_sharing_hash_delete(shr_handle_t handle)
         pprev = &e->next;
         e = e->next;
     }
-    printk("Could not find shr entry for handle %lx\n", handle);
+    printk("Could not find shr entry for handle %"PRIx64"\n", handle);
     BUG();
 } 
 
index ab74323f4a7a90198f841aed95b59d84cefb090e..f614644a7d87bab733a006d970a0819d6252c125 100644 (file)
@@ -2208,7 +2208,11 @@ void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt)
                     mfn = l2e_get_pfn(l2e[i2]);
                     /* Do not use get_gpfn_from_mfn because it may return 
                        SHARED_M2P_ENTRY */
-                    gfn = (i2 + (i3 + (i4 * L3_PAGETABLE_ENTRIES))
+                    gfn = (i2 + (i3
+#if CONFIG_PAGING_LEVELS >= 4
+                                  + (i4 * L3_PAGETABLE_ENTRIES)
+#endif
+                               )
                            * L2_PAGETABLE_ENTRIES) * L1_PAGETABLE_ENTRIES; 
                     flags = p2m_type_to_flags(nt);
                     l1e_content = l1e_from_pfn(mfn, flags | _PAGE_PSE);
@@ -2226,7 +2230,11 @@ void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt)
                     if ( p2m_flags_to_type(flags) != ot )
                         continue;
                     mfn = l1e_get_pfn(l1e[i1]);
-                    gfn = i1 + (i2 + (i3 + (i4 * L3_PAGETABLE_ENTRIES))
+                    gfn = i1 + (i2 + (i3
+#if CONFIG_PAGING_LEVELS >= 4
+                                       + (i4 * L3_PAGETABLE_ENTRIES)
+#endif
+                                    )
                            * L2_PAGETABLE_ENTRIES) * L1_PAGETABLE_ENTRIES; 
                     /* create a new 1le entry with the new type */
                     flags = p2m_type_to_flags(nt);